home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / tools4c.arc / MENU.H < prev    next >
Text File  |  1988-12-27  |  1KB  |  41 lines

  1. typedef struct SEL{
  2.         char *text;
  3.         int    start_col;
  4.         int    start_row;
  5.         int    sel_att;        /* zero for default */
  6.         int    unsel_att;  /* zero for default */
  7.         int    activate_key_1;
  8.         int    activate_key_2;
  9.         int    (*do_function)();  /* NULL if not used */
  10.         char    *exe_call;            /* NULL if not used */
  11.         int    (*help_function)(); /* NULL if not used */
  12.         int    exit;                     /* exit menu after commmand - TRUE or FALSE */
  13.         } SEL;
  14.         
  15.  
  16. typedef struct MENU {
  17.         struct WNDW *menu_window;
  18.         int        default_non_select_att;    /*  same as fill attr        */
  19.         int        default_cursor_att;      
  20.         int        title_format;
  21.         int        window_title_att;
  22.         char        *window_title_text;
  23.         int        pcursor_type;            /* 0==string len, 1==max strg len, 2== full window */
  24.         int        exit_key;
  25.         int        help_key;
  26.         int        (*menu_text)();
  27.         int        (*error_fn)();
  28.         struct SEL    *sel_list;
  29.         int        num_sel;
  30.         }    MENU;
  31.  
  32. /* ---------------- files in menu.c ----------------------*/
  33. extern int menu(MENU *);
  34. extern void display_selections(MENU *);
  35. extern void pcursor(MENU *,int,int);
  36. extern void execute_help( MENU *, int);
  37. extern int execute_selection( MENU *, int);
  38. extern int init_menu(MENU *,int); 
  39.  
  40.  
  41.